﻿<%@ Page Title="" Language="C#" MasterPageFile="~/KeyUnit/KeyUnit.master" AutoEventWireup="true" CodeFile="ListView.aspx.cs" Inherits="KeyUnit_ListView" StylesheetTheme="Main"  %>
<%@ Register Assembly="DundasWebChart" Namespace="Dundas.Charting.WebControl" TagPrefix="DCWC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .menuItem
        {
            background-color: #ffffff;
            border-bottom: dashed 1px #ccc;
            width: 130px;
            height: 30px;
            color: #000000;
            text-align: left;
        }
        
        .selectmenuItem
        {
            background-repeat: no-repeat;
            border-bottom: dashed 1px #ccc;
            width: 130px;
            height: 30px;
            color: #2c5353;
            font-weight: bolder;
        }
        .selectmenuHover a
        {
            text-decoration: none;
        }
        .grid_header
        {
            font-weight: bolder;
        }
        .InnerDiv
        {
            padding: 3px 2px 2px 2px;
            border: solid 0px #CCC;
            width: 120px;
        }
        .headTd
        {
            border-color: #6fb4f3;
            border-collapse: collapse;
            white-space: nowrap;
            border-width: 1px;
            border-style: solid;
            text-align: left;
            padding: 2px;
            background-image: none;
            white-space: nowrap;
        }
        .Td
        {
            border-color: #ccc;
            border-collapse: collapse;
            white-space: nowrap;
            border-width: 1px;
            border-style: solid;
            text-align: left;
            padding: 4px;
            background-image: none;
            white-space: nowrap;
        }
        .hTd
        {
            border-color: #ccc;
            border-collapse: collapse;
            white-space: nowrap;
            border-width: 1px;
            border-style: solid;
            text-align: left;
            padding: 4px;
            background-image: none;
            white-space: nowrap;
            text-align: center;
            font-weight: bolder;
            font-size: large;
        }
        .top_menu
        {
            background: #508686;
            border: solid 1px #ccc;
            width: 121px;
            height: 20px;
            margin: 0 1px 0 0;
            text-align: center;
            padding: 5px 5px 0 5px;
            border-bottom: solid 1px #ccc;
        }
        .top_menuItem
        {
            padding: 2px 0 5px 0;
            text-align: center;
            width: 58px;
            color: White;
            font-weight: bolder;
        }
        .top_selectItem
        {
            color: Red;
            font-weight: bolder;
            border: solid 1px #ccc;
            border-bottom-width: 0px;
            background-image: url('../Images/topmenu_bg.gif');
            background-repeat: repeat-x;
            background-position: center;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


    <script type="text/javascript">
        function ChangInnerSate(event) {

            var parentDiv = event.parentNode.parentNode.parentNode.parentNode.parentNode;
            var InnerDiv = parentDiv.getElementsByTagName("div")[0];
            if (InnerDiv.style.display == "none") {
                event.src = "../Images/subtract.gif";
                InnerDiv.style.display = "block";
            } else {
                event.src = "../Images/add.gif";
                InnerDiv.style.display = "none";
            }
        }
    </script>
     <div style="clear: both">
    </div>
<div style="background-color: #ffffff">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <asp:UpdatePanel runat="server" ID="UpdatePnl">
            <ContentTemplate>
                <div id="left"  style="width:135px; float:left;">
                    <asp:DropDownList ID="dptDepartment" Width="137px" runat="server" 
                        AutoPostBack="True" onselectedindexchanged="dptDepartment_SelectedIndexChanged">
                    </asp:DropDownList>
                    <div style="width: 133px; border: solid 1px #508686;">
                        <div class="top_menu">
                            
                            <%--<asp:Menu ID="YearMenu" runat="server" Orientation="Horizontal" OnMenuItemClick="YearMenu_MenuItemClick"
                                SkipLinkText="">
                                <StaticSelectedStyle CssClass="top_selectItem" />
                                <StaticMenuItemStyle CssClass="top_menuItem" />
                                <Items>
                                    <asp:MenuItem Text="2009年" Value="2009"></asp:MenuItem>
                                    <asp:MenuItem Text="2010年" Value="2010"></asp:MenuItem>
                                </Items>
                            </asp:Menu>--%>
                            <asp:Label runat="server" ID="lblYear" Font-Bold="true" ForeColor="White">类别</asp:Label>
                        </div>
                        <asp:Menu ID="MonthMenu" runat="server" OnMenuItemClick="MonthMenu_MenuItemClick">
                            <StaticSelectedStyle CssClass="selectmenuItem" />
                            <StaticMenuItemStyle CssClass="menuItem" />
                            <StaticHoverStyle CssClass="selectmenuHover" />                     
                        </asp:Menu>
                    </div>
                    <div style="clear: both">
                    </div>
                </div>
                <div  style="width:810px; float:right;">
                    <div style="background-image: url('/pic/kny.gif'); height: 25px; line-height:25px;  border-top:solid 1px #FFF;
                        color: White;  text-align: left; font-weight: bolder;">
                         &nbsp;<asp:Literal runat="server" ID="lblTitle"></asp:Literal>
                    </div>
                    <div id="Div1" style="border: solid 1px #333; border-top:0; height:650px;"  runat="server">
                        <asp:GridView ID="gridList" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        ForeColor="Black" Width="100%" 
                        GridLines="None">
                        <Columns>
                            <asp:TemplateField HeaderText="＋标 题" HeaderStyle-HorizontalAlign="Left">
                                <ItemTemplate>
                                    &nbsp;∴
                                    <asp:HyperLink ID="LinkNews" runat="server"  NavigateUrl='<%#"KeyUnitView.aspx?ID="+Eval("PerformanceID").ToString() %>'
                                         Text='<%#Eval("KeyUnitName").ToString().Length>30?Eval("KeyUnitName").ToString().Substring(0,28)+"...":Eval("KeyUnitName").ToString() %>'
                                        ToolTip='<%#Eval("KeyUnitName").ToString().Length>30?Eval("KeyUnitName").ToString():""%>'></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle Wrap="False" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="WriteTime" HeaderText="发布时间" DataFormatString="{0:yy年M月d日}"
                                HeaderStyle-HorizontalAlign="Left" HtmlEncode="False">
                                <HeaderStyle VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="类别" HeaderStyle-HorizontalAlign="Left">
                                <ItemStyle HorizontalAlign="Left" />
                                <ItemTemplate>
                                     <a href="#" title='<%# Eval("KeyUnitTypeName")%>'><%# Eval("KeyUnitTypeDescript")%></a> 
                                </ItemTemplate>
                                <FooterStyle VerticalAlign="Middle" />
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#CCCC99" Font-Bold="True" ForeColor="White" />
                        <RowStyle Height="23px" ForeColor="Black" HorizontalAlign="Left" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <HeaderStyle Font-Bold="True" ForeColor="#000000" />
                    </asp:GridView>
                    </div>
                </div>
                <div style="clear: both">
                </div>	
		   <div style ="text-align :right; margin-right :20px; ">
        <asp:LinkButton ID="NavHome" runat="server" OnClick="NavHome_Click">首  页</asp:LinkButton>
           
        <asp:LinkButton ID="NavPre" runat="server" OnClick="NavPre_Click">上一页</asp:LinkButton>
        <asp:LinkButton ID="NavNext" runat="server" OnClick="NavNext_Click">下一页</asp:LinkButton><span
            style="font-family: Times New Roman">&nbsp;</span>
        <asp:LinkButton ID="NavLast" runat="server" OnClick="NavLast_Click">尾  页</asp:LinkButton> &nbsp;当前为第
            <asp:Label ID="CurrPage" runat="server"></asp:Label>页&nbsp;共计
            <asp:Label ID="PagesCount" runat="server"></asp:Label>页
            <asp:Label ID="TotalNum" runat="server"></asp:Label>篇文章<br />
        </div>
        <asp:Label ID="lblWhere" runat="server" Text=" 1=1 " Visible="False"></asp:Label>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>

